home *** CD-ROM | disk | FTP | other *** search
- The script stored in "mail script":
-
- on ReplyByMail(toText, subjectText, bodyText)
- tell application "Eudora1.5.1Fat"
- activate
- try
- space wasted of (mailbox 1)
- on error e number en
- if en = -1708 then
- display dialog ¬
- "It seems like you're using version 1.4 of Eudora. " & ¬
- "It doesn't support AppleScript well enough, so please " & ¬
- "upgrade to version 1.4.3 or 1.5 or 2.1." & ¬
- "" buttons {"OK"} default button "OK"
- else
- display dialog e & " (error " & en & ")" buttons {"OK"} default button {"OK"}
- end if
- return
- end try
- try
- -- suggested by Anne Harwell: insert "Re:" in subject
- if subjectText does not start with "Re:" then
- copy ("Re:" & subjectText) to subjectText
- end if
- copy (make message at end of mailbox "out") to msgRef
- set the field "to" of message msgRef to toText
- set the field "subject" of message msgRef to subjectText
- set the field "" of message msgRef to bodyText
- on error e number en
- display dialog e & " (error " & en & ")" buttons {"OK"} default button {"OK"}
- end try
- end tell
- end ReplyByMail
-
-
-
- The script stored in "URL script":
-
- on OpenURL(theScheme, theURL)
- -- theScheme contains the scheme not including colon,
- -- e.g.: "http", "ftp", "mailto", "gopher"
- -- in lowercase
- -- it may too contain the pseudo URL "info-mac"
-
- -- theURL contains the complete URL, e.g.
- -- ftp://ftp.ruc.dk/pub/nuntius/Nuntius1.3b25.sea.hqx
-
- --display dialog ("scheme is '" & theScheme & "' the URL is '" & theURL & "'")
- try
- if (theScheme is "ftp" and ((offset of ".htm" in theURL) is 0)) ¬
- or theScheme is "info-mac" then
- -- Use Anarchie for ftp, except if the file is a .html file
- -- which should be displayed by the www browser.
- -- Note that the some machines stores .html as .htm
- -- (They are so stupid, they even can't discard the last letter of .html)
- --
- -- Anarchie is a bit stupid about short URLs, eg. "ftp://frederik.ruc.dk"
- -- It simply wants to last slash
- copy characters of theURL to theURLCharList
- copy (count theURLCharList) to numChars
- if numChars > 6 and ¬
- (items 7 thru numChars of theURLCharList) ¬
- does not contain "/" then
- copy theURL & "/" to theURL
- end if
- tell application "Anarchie"
- ignoring application responses
- -- don't wait for the reply AppleEvent as it
- -- may take a lot of time
- -- Anarchie sends the reply event when it
- -- has fetched all of the file
- --display dialog theURL
- geturl theURL
- end ignoring
- end tell
- else
- tell application "Netscape 1.0N"
- run
- -- NetScape sends back the reply event immediately,
- -- so there is no need for a ignoring statement
- try
- GetURL theURL -- 0.93b type event
- activate
- on error e number en
- if en = -1708 then
- activate
- activate
- activate
- activate
- activate
- «event wwwcourl» theURL -- 0.9b type event
- else
- display dialog e & " (error " & en & ")" buttons {"OK"} default button {"OK"}
- end if
- end try
- end tell
- end if
- on error e number en
- display dialog e & " (error " & en & ")" buttons {"OK"} default button {"OK"}
- end try
- end OpenURL
-